package com.zzyl.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Slf4j
@Component
public class DemoTask {


    /***
     * 定时执行该方法
     * cron = "":执行周期表达式
     */
    @Scheduled(cron = "0/5 * * * * ? ")
    public void task(){
        log.info("执行了task");
    }
}
